<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>小区管家</title>
    <th:block th:include="common :: headerCss"></th:block>
    <style>
        .layui-tab-content{
            padding: 0;
        }
        .show-frame{
            top: 50px !important;
            overflow: hidden;
        }
        #demoAdmin{
            position: absolute;
            padding: 10px;
            width: 100%;
            height: 100%;
            border-radius: 2px;
        }
    </style>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-hide-xs layui-bg-black">小区管家</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item layui-hide layui-show-md-inline-block">
                <a href="javascript:;">
                    <img th:src="@{/static/img/logo.jpg}" class="layui-nav-img">
                    <span th:text="${nickName}"></span>
                </a>
                <dl class="layui-nav-child">
                    <div shiro:authenticated>
                        <dd><a th:href="@{/toUpdatePwd}" target="frameName" shiro:hasPermission="system:user:edit">修改密码</a></dd>
                        <dd><a th:href="@{/logout}">注销</a></dd>
                    </div>
                </dl>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a th:href="@{/firstPage}" target="frameName"><i class="layui-icon layui-icon-home"></i>首页</a>
                </li>
                <li class="layui-nav-item" th:each="menus : ${menusList}">
                    <a href="javascript:;" th:text="${menus.getTitle()}"><i th:class="${menus.getIcon()}"></i></a>
                    <dl class="layui-nav-child" th:if="${not #lists.isEmpty(menus.getChildren())}">
                        <dd th:each="menu : ${menus.getChildren()}">
                            <a target="frameName" th:href="${menu.getHref()}" th:text="${menu.getTitle()}"></a>
                        </dd>
                    </dl>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-body show-frame">
        <!-- 内容主体区域 -->
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <div style="padding: 15px;">
                    <iframe frameborder="0" scrolling="auto" id="demoAdmin" name="frameName" th:src="@{/firstPage}"></iframe>
                </div>
            </div>
        </div>

    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        底部固定区域
    </div>
</div>
<th:block th:include="common :: footJs"></th:block>

</body>
</html>